package com.ly.service;

import com.ly.bean.Roles;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
@author 李岩
@date 2021/12/14-13:52
@describe
*/
public interface RolesService{

    //获取用户角色列表
    List<Roles> selectRoleByaId(Integer aId) throws Exception;
    //获取所有的角色列表
    List<Roles> selectAllRole() throws Exception;

    //删除角色菜单
    void deleteRolesMenuByRid(Integer roleId) throws Exception;

    //添加角色的菜单
    void addRolesMenu(Integer roleId, Integer menuId) throws Exception;

    /**
     * 删除角色
     */
    void deleteRoleByPrimaryKey(Integer id) throws Exception;
    /**
     * 添加角色
     */
    void insertRoleSelective(Roles record) throws Exception;
    /**
     *更改角色
     */
    void updateRoleByPrimaryKeySelective(Roles record) throws Exception;

    /**
     * 根据角色id获取角色信息
     */
    Roles selectRoleByPrimaryKey(Integer id) throws Exception;

    //根据roles 删除 roles_admins
    void deleteRoleAdminByPrimaryKey(Integer roles) throws Exception;

    //根据roles 删除 roles_menu
    void deleteRoleMenuByPrimaryKey(Integer roles) throws Exception;
}
